package com.jeecms.wicool.entity.product.base;

import com.jeecms.wicool.entity.product.Product;

import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * AbstractProductSku entity provides the base persistence definition of the
 * ProductSku entity. @author MyEclipse Persistence Tools
 */

public abstract class AbstractProductSpecification implements java.io.Serializable {

	// Fields

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;
	private Product product;
	private String skuCode;
	private String skuName;
	private BigDecimal price;
	private BigDecimal priceMarket;
	private Integer storeNum;
	private BigDecimal freight;
	private Timestamp createTime;
	private Timestamp updateTime;

	// Constructors

	/** default constructor */
	public AbstractProductSpecification() {
	}

	public AbstractProductSpecification(Integer id, Product product, String skuCode,
                                        String skuName, BigDecimal price, BigDecimal priceMarket,
                                        Integer storeNum, BigDecimal freight, Timestamp createTime,
                                        Timestamp updateTime) {
		super();
		this.id = id;
		this.product = product;
		this.skuCode = skuCode;
		this.skuName = skuName;
		this.price = price;
		this.priceMarket = priceMarket;
		this.storeNum = storeNum;
		this.freight = freight;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public String getSkuCode() {
		return skuCode;
	}

	public void setSkuCode(String skuCode) {
		this.skuCode = skuCode;
	}

	public String getSkuName() {
		return skuName;
	}

	public void setSkuName(String skuName) {
		this.skuName = skuName;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public BigDecimal getPriceMarket() {
		return priceMarket;
	}

	public void setPriceMarket(BigDecimal priceMarket) {
		this.priceMarket = priceMarket;
	}

	public Integer getStoreNum() {
		return storeNum;
	}

	public void setStoreNum(Integer storeNum) {
		this.storeNum = storeNum;
	}

	public BigDecimal getFreight() {
		return freight;
	}

	public void setFreight(BigDecimal freight) {
		this.freight = freight;
	}

	public Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	public Timestamp getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}
	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jeecms.wicool.entity.product.ProductSku)) return false;
		else {
			com.jeecms.wicool.entity.product.ProductSku ps = (com.jeecms.wicool.entity.product.ProductSku) obj;
			if (null == this.getId() || null == ps.getId()) return false;
			else return (this.getId().equals(ps.getId()));
		}
	}
	private int hashCode = Integer.MIN_VALUE;
	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}
}